{
语法百题 解题报告：
 http://git.oschina.net/et0662/sznoi-grammar/ 
}
var
	leaves,n,s,i,total,t:longint;
begin
	read(n,s);
	leaves:=0;
	total:=0;
	for i:=1 to n do
	begin
		read(t);
		leaves:=leaves+t;
		total:=total+ leaves div s;
		leaves:=leaves mod s;
	end;
	if leaves>0 then inc(total);
	writeln(total);
end.
